import chenhs.oop.study.泛型.Generic;
import org.junit.Test;


/**
 * <ul>peanut 学习
 * <li> Author:      chenhs</li>
 * <li>E-Mail:    651617663@qq.com</li>
 * <li> Date:     2021/6/5 - 7:44</li>
 * <li>Description:        注释  </li>
 * <li>+-History-------------------------------------+</li>
 * <li>| Date          Author       Description    </li>
 * <li>|2021/6/5 - 7:44         chenhs       Created   </li>
 * <li>+------------------------------------------------</li>
 * </ul>
 */
public class 泛型 {
	@Test
	public void  test(){
		Generic<String> generic = new Generic<String>();
		generic.setT("1");
		System.out.println("此时泛型传入的是一个String类型");
		Generic<Integer> generic2 = new Generic<Integer>();
		generic2.setT(1);
		
		System.out.println("此时泛型传入的是一个Intager类型");
		
	}
	//测试可变参数
	@Test
	public void test2(){
	    String[] array = new String[]{"a","b","c"};
		Integer[] array2 = new Integer[]{1,2,3};
		Generic<String> generic = new Generic<String>();
		generic.test2(array);
		generic.test2(array2);
	}

	
}
